﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace NetLogger
{
	public class NetExistingActivation
	{
		public NetExistingActivation( XElement node )
		{
			foreach ( XElement item in node.Elements() )
			{
				switch ( item.Name.LocalName )
				{
					case "name":
						Name = NetPost.DecodedString( item );
						break;
					case "net_id":
						ActivationId = ( int ) item;
						break;
				}
			}
		}

		public string Name
		{
			get;
			private set;
		}

		public int ActivationId
		{
			get;
			private set;
		}

		public override string ToString()
		{
			return Name;
		}
	}
}
